<h1>Scouting record of {$username}</h1>
{section name=num loop=$numadva}
<a href="#{$advan[num].advancement|replace:' ':''}">{$advan[num].advancement}</a><br />
{/section}
<a href="#badges">Interest Badges</a><br />
{if $numadva > 0}
{if $action == "edit"}To mark a requirement as complete double click on where it says "Not Complete"
<br />To mark a whole advancement badge as complete double click on the name of the badge<br /><br />{/if}
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" class="table">
    {section name=num loop=$numadva}
	  {if $advan[num].numitems > 0}
      <tr><th colspan="2" class="bighead" onDblClick="javascript:completeb('{$advan[num].ID}','{$advan[num].advancement}')"><a name="{$advan[num].advancement|replace:' ':''}"></a>{$advan[num].advancement}</th></tr>
	  <tr>
        <th class="smallhead"></th>
		<th width="83%" scope="col" class="smallhead">Requirement</th>
	  </tr>
	  {section name=numreq loop=$advan[num].numitems}
		  <tr valign="top" align="center">
            {if $advan[num].items[numreq].done}<td class="complete" onDblClick="javascript:uncomplete('{$advan[num].items[numreq].ID}', '{$advan[num].items[numreq].item}', '{$advan[num].ID}')">Completed</td>{else}<td class="notcomplete" onDblClick="javascript:complete('{$advan[num].items[numreq].ID}', '{$advan[num].items[numreq].item}', '{$advan[num].ID}')">Not Complete</td>{/if}
			<td class="text" title="{$advan[num].items[numreq].description}"><strong>{$advan[num].items[numreq].item}</strong>{if $advan[num].items[numreq].comment != ""}<br />
            <span class="comments">{$advan[num].items[numreq].comment}</span>{/if}</td>
		  </tr>
	  {/section}
      {/if}
	 {/section}
</table>
{else}
<div align="center">No Advancement Badges</div>
{/if}
<p>&nbsp;</p>

<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" class="table">
{if $numbadge > 0}
<tr>
    <th scope="col" colspan="2" class="bighead"><a name="badges"></a>Other Badges Earned</h1></th>
  </tr>
  <tr>
    <th width="21%" class="smallhead">Date</th>
    <th width="79%" class="smallhead">Badge</th>
  </tr>
{section name=badgenum loop=$numbadge}
  <tr>
    <td class="text">{$badges[badgenum].date}</td>
    <td class="text">{$badges[badgenum].badge}</td>
  </tr>
 {/section}
 {else}
<tr><td colspan="2" class="text">User has no badges yet</td></tr>
{/if}
 {if $action == "edit"}<tr><td colspan="2" class="text"><div align="center"><input type="button" class="button" onclick="addbadge();" value="Add a badge" /></div></td></tr>{/if}
</table>
{if $action == "edit"}
<form name="form" method="post" action="{$editFormAction}">
  <input name="itemname" type="hidden" id="item" />
  <input name="comment" type="hidden" id="comment" />
  <input name="what" type="hidden" id="what" />
</form>
{/if}
<div align="center"><input type="button" class="button" onclick="window.location = 'admin.php?page={$back}&amp;id={$userid}&amp;action=Edit'" value="Back" /></div>